package org.cogaen.sound.xp;

import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.LineUnavailableException;
import javax.sound.sampled.Mixer;

public class FirstTest {

	
	public static void printMixer(Mixer mixer) throws LineUnavailableException {
		System.out.println(mixer.getMixerInfo());
		System.out.println("Line: " + mixer.getLineInfo());
		System.out.println("Open: " + mixer.isOpen());
		mixer.open();
		System.out.println("Open: " + mixer.isOpen());
		mixer.close();
	}
	
	public static void main(String[] args) throws LineUnavailableException {

		System.out.println("Mixers:");
		for (Mixer.Info minfo : AudioSystem.getMixerInfo()) {
			System.out.println();
			printMixer(AudioSystem.getMixer(minfo));
		}
	}

}
